﻿<UserControl x:Class="HTML5Converter.UC_ReplaceRemove"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="600" Width="1000">
    <Grid>        
        <DataGrid Name="grdReplaceRemove" AutoGenerateColumns="False" SelectionMode="Single" CanUserAddRows="False" HorizontalAlignment="Left" VerticalAlignment="Top" Height="448" Width="990" Margin="0,150,0,0" SelectionChanged="grdReplaceRemove_SelectionChanged">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="StartsWith" Width="200">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Label Content="{Binding StartsWith}"></Label>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Contains" Width="200">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Label Content="{Binding Contains}"></Label>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Where" Width="80">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Label Content="{Binding Where}"></Label>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Action" Width="80">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Label Content="{Binding Action}"></Label>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="ReplaceRelativeTags" Width="120">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Label Content="{Binding ReplaceRelativeTags}"></Label>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="ReplaceWith" Width="200">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Label Content="{Binding ReplaceWith}"></Label>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Delete" Width="100">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button Name="btnDelete" Content="Delete" Click="btnDelete_Click" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Starts With" VerticalAlignment="Top" Margin="11,10,0,0"/>
        <TextBox Name="txtStartsWith" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Width="200" Margin="76,6,0,0"/>
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Contains" VerticalAlignment="Top" Margin="20,40,0,0"/>
        <TextBox Name="txtContains" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Width="200" Margin="76,36,0,0"/>
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Where" VerticalAlignment="Top" Margin="300,10,0,0"/>
        <ComboBox Name="cmbWhere" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" Margin="363,7,0,0" SelectionChanged="cmbWhere_SelectionChanged">
            <ComboBoxItem Content=""></ComboBoxItem>
            <ComboBoxItem Content="Before HTML Tag" Name="H"></ComboBoxItem>
            <ComboBoxItem Content="Inside Head Tag" Name="D"></ComboBoxItem>
            <ComboBoxItem Content="Inside body Tag" Name="B"></ComboBoxItem>
        </ComboBox>
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Action" VerticalAlignment="Top" Margin="302,41,0,0"/>
        <ComboBox Name="cmbAction" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" Margin="363,37,0,0" SelectionChanged="cmbAction_SelectionChanged">
            <ComboBoxItem Content=""></ComboBoxItem>
            <ComboBoxItem Content="Remove" Name="R"></ComboBoxItem>
            <ComboBoxItem Content="Replace" Name="P"></ComboBoxItem>
            <ComboBoxItem Content="Append" Name="A"></ComboBoxItem>
        </ComboBox>
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Replace with" VerticalAlignment="Top" Margin="496,10,0,0"/>
        <TextBox Name="txtReplaceWith" TextWrapping="Wrap" Text="" Margin="571,3,14,489"/>
        <CheckBox Name="chkReplaceRelativeTags" IsEnabled="False" Content="Replace Relative Tags" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="21,68,0,0" Unchecked="chkReplaceRelativeTags_Unchecked" Checked="chkReplaceRelativeTags_Checked"/>
        <Button Name="btnSave" Content="Save" HorizontalAlignment="Left" VerticalAlignment="Top" Width="74" Margin="366,87,0,0" Click="btnSave_Click"/>
        <Button Name="btnReset" Content="Reset" HorizontalAlignment="Left" VerticalAlignment="Top" Width="74" Margin="466,87,0,0" Click="btnReset_Click"/>
    </Grid>
</UserControl>
